import { createStore } from '@/my-vuex';

import state from './state';
import actions from './actions';
import mutations from './mutations';
import getters from './getters';

/**
 * 备注：
 * action:
 *   1. store -> commit dispatch
 *   2. payload -> 参数
 * action -> mutation -> method -> mutate -> state
 *
 * component -> call action -> dispatch
 * component -> call mutation -> commit
 */

export default createStore({
  state,
  actions,
  mutations,
  getters
});
